home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / lpc / cmdtab.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-01-23  |  2.2 KB  |  62 lines

  1. /*
  2.  * Copyright (c) 1983 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted
  6.  * provided that this notice is preserved and that due credit is given
  7.  * to the University of California at Berkeley. The name of the University
  8.  * may not be used to endorse or promote products derived from this
  9.  * software without specific prior written permission. This software
  10.  * is provided ``as is'' without express or implied warranty.
  11.  */
  12.  
  13. #ifndef lint
  14. static char sccsid[] = "@(#)cmdtab.c    5.2 (Berkeley) 5/5/88";
  15. #endif /* not lint */
  16.  
  17. /*
  18.  * lpc -- command tables
  19.  */
  20.  
  21. #include "lpc.h"
  22.  
  23. int    Abort(), clean(), enable(), disable(), down(), help();
  24. int    quit(), restart(), start(), status(), stop(), topq(), up();
  25.  
  26. char    aborthelp[] =    "terminate a spooling daemon immediately and disable printing";
  27. char    cleanhelp[] =    "remove cruft files from a queue";
  28. char    enablehelp[] =    "turn a spooling queue on";
  29. char    disablehelp[] =    "turn a spooling queue off";
  30. char    downhelp[] =    "do a 'stop' followed by 'disable' and put a message in status";
  31. char    helphelp[] =    "get help on commands";
  32. char    quithelp[] =    "exit lpc";
  33. char    restarthelp[] =    "kill (if possible) and restart a spooling daemon";
  34. char    starthelp[] =    "enable printing and start a spooling daemon";
  35. char    statushelp[] =    "show status of daemon and queue";
  36. char    stophelp[] =    "stop a spooling daemon after current job completes and disable printing";
  37. char    topqhelp[] =    "put job at top of printer queue";
  38. char    uphelp[] =    "enable everything and restart spooling daemon";
  39.  
  40. struct cmd cmdtab[] = {
  41.     { "abort",    aborthelp,    Abort,        1 },
  42.     { "clean",    cleanhelp,    clean,        1 },
  43.     { "enable",    enablehelp,    enable,        1 },
  44.     { "exit",    quithelp,    quit,        0 },
  45.     { "disable",    disablehelp,    disable,    1 },
  46.     { "down",    downhelp,    down,        1 },
  47.     { "help",    helphelp,    help,        0 },
  48.     { "quit",    quithelp,    quit,        0 },
  49.     { "restart",    restarthelp,    restart,    0 },
  50.     { "start",    starthelp,    start,        1 },
  51.     { "status",    statushelp,    status,        0 },
  52.     { "stop",    stophelp,    stop,        1 },
  53.     { "topq",    topqhelp,    topq,        1 },
  54.     { "up",        uphelp,        up,        1 },
  55.     { "?",        helphelp,    help,        0 },
  56. #ifndef sprite
  57.     { 0 },
  58. #endif
  59. };
  60.  
  61. int    NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]);
  62.